package com.webbei.pojo;

import java.util.List;

public class Trade {
	private List<Orders> orders;
    private Long tradeId;
    private int count;
    private Double price;
	public List<Orders> getOrders() {
		return orders;
	}
	public void setOrders(List<Orders> orders) {
		this.orders = orders;
	}
	public Long getTradeId() {
		return tradeId;
	}
	public void setTradeId(Long tradeId) {
		this.tradeId = tradeId;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public Double getPrice() {
		Double d = 0.0;
		for(Orders o:orders){
			if(o.getOrderTotalPrice()!=null){
				d+=o.getOrderTotalPrice();
			}
		}
		Double dou = orders.get(0).getPostfee();
		if(dou!=null){
			d+=dou;
		}
		
		return d;
	}
    
}
